
package com.edu.whty.entity.base;

public class ResponseEntity {
	//返回消息码
	private String resCode;
	//返回消息内容
	private String resMsg;
	//返回数据
	private Object data;

	public ResponseEntity(String resCode, String resMsg){
		this.resCode = resCode;
		this.resMsg = resMsg;
	}
	
	public ResponseEntity(String resCode, String resMsg, Object data){
		this.resCode = resCode;
		this.resMsg = resMsg;
		this.data = data;
	}

	public static ResponseEntity getSuccessResponse() {
		ResponseEntity response = new ResponseEntity("000000", "请求成功");
		return response;
	}

	public static ResponseEntity getSuccessResponse(Object o) {
		ResponseEntity response = new ResponseEntity("000000", "请求成功", o);
		return response;
	}

	public static ResponseEntity getFailedResponse(String resCode, String resMsg) {
		ResponseEntity response = new ResponseEntity(resCode, resMsg);
		return response;
	}

	public String getResCode() {
		return resCode;
	}

	public void setResCode(String resCode) {
		this.resCode = resCode;
	}

	public String getResMsg() {
		return resMsg;
	}

	public void setResMsg(String resMsg) {
		this.resMsg = resMsg;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

}
